container: Use correct allocation for calling size_allocate()
authorBenjamin Otte <otte@redhat.com>
Mon, 28 Sep 2015 21:33:28 +0000 (23:33 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 28 Oct 2015 18:44:27 +0000 (19:44 +0100)
gtk/gtkcontainer.c

index aed12b9c69c9c7e665dcbd0b5170611a82030149..25532f3c4c93c257846268a9fb7fbc75420cbfb1 100644 (file)
@@ -2180,9 +2180,10 @@ gtk_container_real_check_resize (GtkContainer *container)
   GtkWidget *widget = GTK_WIDGET (container);
   GtkAllocation allocation;
   GtkRequisition requisition;
+  int baseline;
 
   gtk_widget_get_preferred_size (widget, &requisition, NULL);
-  _gtk_widget_get_allocation (widget, &allocation);
+  gtk_widget_get_allocated_size (widget, &allocation, &baseline);
 
   if (requisition.width > allocation.width ||
       requisition.height > allocation.height)
@@ -2198,7 +2199,7 @@ gtk_container_real_check_resize (GtkContainer *container)
     }
   else
     {
-      gtk_widget_size_allocate (widget, &allocation);
+      gtk_widget_size_allocate_with_baseline (widget, &allocation, baseline);
     }
 }
 
@@ -2220,6 +2221,7 @@ gtk_container_resize_children (GtkContainer *container)
 {
   GtkAllocation allocation;
   GtkWidget *widget;
+  gint baseline;
 
   /* resizing invariants:
    * toplevels have *always* resize_mode != GTK_RESIZE_PARENT set.
@@ -2229,9 +2231,9 @@ gtk_container_resize_children (GtkContainer *container)
   g_return_if_fail (GTK_IS_CONTAINER (container));
 
   widget = GTK_WIDGET (container);
-  _gtk_widget_get_allocation (widget, &allocation);
+  gtk_widget_get_allocated_size (widget, &allocation, &baseline);
 
-  gtk_widget_size_allocate (widget, &allocation);
+  gtk_widget_size_allocate_with_baseline (widget, &allocation, baseline);
 }
 
 static void